home *** CD-ROM | disk | FTP | other *** search
- Path: cs.tu-berlin.de!beinhart
- From: beinhart@cs.tu-berlin.de (Werner Henze)
- Newsgroups: comp.lang.c++
- Subject: Re: extern functions questions????????
- Date: 27 Feb 1996 08:48:25 GMT
- Organization: TU Berlin Fachbereich Informatik
- Message-ID: <4guggr$66b@news.cs.tu-berlin.de>
- References: <4gtug0$j3t@sunburst.ccs.yorku.ca>
- NNTP-Posting-Host: frieda.cs.tu-berlin.de
- Mime-Version: 1.0
- Content-Type: text/plain; charset=iso-8859-1
- Content-Transfer-Encoding: 8bit
- In-reply-to: KuMan's message of 27 Feb 1996 04:39:36 MET
-
- In article <4gtug0$j3t@sunburst.ccs.yorku.ca> KuMan <" yu133496"@yorku.ca> writes:
-
- > I've this problem that I have to declare a class member function with two parameters(one
- > is a char pointer, the other is an int index). O.K. the problem is that the int index is also the
- > array index for that particular class.......
- >
- > class whatever{
- > .
- > .
- > add(int index, char *things); // member function.
- > .
- > .
- > }
- >
- > main(){
- > .
- > whatever x[20];
- > .
- > .
- > x.add[index](index, "hello"); //array index(main) is the
- > //same member function index(add).
- > .
- > .
- > }
- >
- > what can I do to make this function work??
- >
- > thank you
-
- What about x[index].add(index, "hello"); ???
- "index" is an index into the array, not an index
- for the function add, right?
-
- Ciao, Werner...
-
- --
-